package com.cdd.goods.controller.api;

import com.cdd.goods.mapper.GoodsMapper;
import com.common.entity.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/goods/ApiGoods")
public class ApiGoodsController {
    @Autowired
    private GoodsMapper goodsMapper;

    @PostMapping("updateById/{id}")
    public Integer updateById(@PathVariable String id){
        System.out.println("1111111111123"+id);
        Goods goods = new Goods();
        goods.setId(id);
        goods.setIsAdd("1");
        int i = goodsMapper.updateById(goods);
        System.out.println("2222222222222222222"+i);


        return i;
    }

}